﻿--use PolePosition
GO

IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'up_UtilityAssetDistribution_SelectIdList')
	DROP PROCEDURE up_UtilityAssetDistribution_SelectIdList
GO

CREATE PROCEDURE up_UtilityAssetDistribution_SelectIdList
	 @UtilityFk int 
	,@SearchByType varchar(50) = null
	,@SearchByText varchar(50) = null
AS

DECLARE @IdList varchar(MAX)
SET @IdList = ''


SELECT 
	 @IdList = @IdList + CONVERT(varchar, [Utility_Asset_DistributionId]) + ','
FROM v_tb_Utility_Asset_Distributions
WHERE
	[UtilityFK] = @UtilityFk

SELECT @IdList

GO

